package com.air.thread.pool;

import java.util.concurrent.*;

/**
 * jdk线程池
 *
 * @author shent
 */
public class ThreadPoolDemo {
    public static void main(String[] args) {
        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(
                5,
                10,
                1000,
                TimeUnit.MILLISECONDS,
                new LinkedBlockingDeque<Runnable>(10),
                Executors.defaultThreadFactory(),
                new ThreadPoolExecutor.AbortPolicy());

        threadPoolExecutor.execute(() -> {

        });
        threadPoolExecutor.submit(() -> {

        });
    }
}
